package learning.reflect;


public class Example_01 {
    String s;
    int i,i2,i3;
    private Example_01(){ // 构造方法1
    }

    protected Example_01(String s,int i){ // 构造方法2
        this.s = s;
        this.i = i;
    }

    public Example_01(String... strings) throws NumberFormatException{ // 构造方法3
        if (0 < strings.length)
            i = Integer.parseInt(strings[0]);
        if (1 < strings.length)
            i2 = Integer.parseInt(strings[1]);
        if (2 < strings.length)
            i3 = Integer.parseInt(strings[2]);
    }

    public void print(){
        System.out.println("s = " + s);
        System.out.println("i = " + i);
        System.out.println("i2 = " + i2);
        System.out.println("i3 = " + i3);
    }
}
